package listbyorder.access101_200.test153;

/**
 * @author code_yc
 * @version 1.0
 * @date 2020/6/13 10:12
 */
public class Solution2 {

    // 创建转化之后的数组
    public int findMin(int[] nums) {
        int start = 0;
        int end = nums.length - 1;
        while (start < end) {
            int mid = (start + end) >>> 1;
            if (nums[mid] > nums[end]) {
                start = mid + 1;
            } else {
                end = mid;
            }
        }
        return nums[start];
    }

}
